import request from '@/utils/request';

// 新增求职者
export function apiRequestAdd(data) {
  return request({
    url: '/inside/recruit',
    method: 'post',
    data: data
  });
}

// 招聘列表查询（分页）
export function apiRequestList(query) {
  return request({
    url: '/inside/recruit/list',
    method: 'get',
    params: query
  });
}

// 编辑求职者
export function apiRequestUpdate(data) {
  return request({
    url: `/inside/recruit/`,
    method: 'PUT',
    data: data
  });
}

// 求职者详情
export function apiRequestDetail(id) {
  return request({
    url: `/inside/recruit/${id}`,
    method: 'get'
  });
}

// 求职者删除
export function apiRequestDelete(ids) {
  return request({
    url: `/inside/recruit/${ids}`,
    method: 'delete'
  });
}

// 面试官查询
export function apiInterviewList(query) {
  return request({
    url: '/inside/interview/list',
    method: 'get',
    params: query
  });
}

// 增加面试官
export function apiInterviewAdd(query) {
  return request({
    url: '/inside/interview/add/'+ query,
    method: 'get'
  });
}

// 删除面试官
export function apiInterviewDel(ids) {
  return request({
    url: `/inside/interview/${ids}`,
    method: 'delete'
  });
}

// 待办事项列表查询，通知
export function apiWaitAffairList() {
  return request({
    url: '/inside/waitAffair/list',
    method: 'get'
  });
}

// 流转（流程变化）
export function apiRequestFlowto(data) {
  return request({
    url: '/inside/recruit/flowto',
    method: 'POST',
    data: data
  });
}

// 手动分配面试官
export function apiRequestViewerset(query) {
  return request({
    url: '/inside/recruit/viewerset',
    method: 'get',
    params: query
  });
}

// 上传接口
export function apiUploadInterview(data) {
  return request({
    url: '/inside/recruit/upload',
    method: 'post',
    data: data
  });
}
